package com.nanjia.boot.warehouse.storagelocation.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nanjia.boot.common.result.Result;
import com.nanjia.boot.warehouse.storagelocation.model.entity.WarehouseStorageLocation;
import com.nanjia.boot.warehouse.storagelocation.model.form.WarehouseStorageLocationForm;
import com.nanjia.boot.warehouse.storagelocation.model.query.WarehouseStorageLocationQuery;
import com.nanjia.boot.warehouse.storagelocation.model.vo.WarehouseStorageLocationVO;

import java.util.List;

/**
 * 仓库库位服务类
 *
 * @author 周洋
 * @since 2025-08-22 09:39
 */
public interface WarehouseStorageLocationService extends IService<WarehouseStorageLocation> {

    /**
     *仓库库位分页列表
     *
     * @return {@link IPage<WarehouseStorageLocationVO>} 仓库库位分页列表
     */
    IPage<WarehouseStorageLocationVO> getWarehouseStorageLocationPage(WarehouseStorageLocationQuery queryParams);

    /**
     * 获取仓库库位表单数据
     *
     * @param id 仓库库位ID
     * @return 仓库库位表单数据
     */
     WarehouseStorageLocationForm getWarehouseStorageLocationFormData(Long id);

    /**
     * 新增仓库库位
     *
     * @param formData 仓库库位表单对象
     * @param ipAddr
     * @return 是否新增成功
     */
    boolean saveWarehouseStorageLocation(WarehouseStorageLocationForm formData, String ipAddr);

    /**
     * 修改仓库库位
     *
     * @param id       仓库库位ID
     * @param formData 仓库库位表单对象
     * @param ipAddr
     * @return 是否修改成功
     */
    boolean updateWarehouseStorageLocation(Long id, WarehouseStorageLocationForm formData, String ipAddr);

    /**
     * 删除仓库库位
     *
     * @param ids 仓库库位ID，多个以英文逗号(,)分割
     * @return 是否删除成功
     */
    boolean deleteWarehouseStorageLocations(String ids);

    Result<List<WarehouseStorageLocationVO>> getWarehouseStorageLocationOptions(WarehouseStorageLocationQuery queryParams);
}
